#include"Sort.h"
#include"Stack.h"
void test1()
{
	int arr[] = { 2,8,6,9,1,0,6 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	PrintArray(arr, sz);
	//BubbleSort(arr, sz);
	QuickSort(arr, 0, sz - 1);
	PrintArray(arr, sz);
}
void test2()
{
	int N = 30;
	int* tmp = (int*)malloc(sizeof(int) * N);
	if (tmp == NULL)
	{
		perror("test2->malloc failed");
		exit(-1);
	}
	int i = 0;
	for (i = 0; i < N; i++)
	{
		tmp[i] = rand() % 100;
	}
	PrintArray(tmp, N);
	//BubbleSort(tmp, N);
	QuickSortNonR(tmp, 0, N - 1);
	PrintArray(tmp, N);
}
void testStack()
{
	ST st;
	StackInit(&st);
	//StackPush(&st, )

	StackDestory(&st);
}
int main()
{
	srand((unsigned)time(NULL));
	//test1();
	test2();
	//testStack();
	return 0;
}



